<?php

namespace JsonLowCode\UI;

use JsonLowCode\Schema;
use JsonLowCode\Traits\Props\HasContentStyle;
use JsonLowCode\Traits\Props\HasDescription;
use JsonLowCode\Traits\Props\HasDescriptionStyle;
use JsonLowCode\Traits\Props\HasExtra;
use JsonLowCode\Traits\Props\HasTitle;
use JsonLowCode\Traits\Props\HasTitleExtra;
use JsonLowCode\Traits\Slots\HasSlotAction;
use JsonLowCode\Traits\Slots\HasSlotAvatar;
use JsonLowCode\Traits\Slots\HasSlotDescription;
use JsonLowCode\Traits\Slots\HasSlotFooter;
use JsonLowCode\Traits\Slots\HasSlotHeader;
use JsonLowCode\Traits\Slots\HasSlotHeaderExtra;
use Spatie\FlareClient\Concerns\HasContext;

/**
 * Thing组件
 * @method static Thing make(mixed $children = null) Thing组件
 */
class Thing extends Schema
{
    protected string $componentName = "NThing";

    use HasTitle, HasTitleExtra, HasDescription, HasContext, HasContentStyle, HasDescriptionStyle;

    use HasSlotHeader, HasSlotHeaderExtra, HasSlotFooter, HasSlotAvatar, HasSlotDescription, HasSlotAction;

    /**
     * @param mixed|null $children
     */
    public function __construct(mixed $children = null)
    {
        parent::__construct();
        $this->children($children);
    }


    /**
     * 是否启用内容缩进
     * @param bool|string $bool
     * @return $this
     */
    public function contentIndented(bool|string $bool = true): static
    {
        return $this->prop('contentIndented', $bool);
    }
}
